package com.haidechizi.fastadmin.modules.sys.controller;

import com.haidechizi.fastadmin.common.page.PageDto;
import com.haidechizi.fastadmin.common.utils.PageInfo;
import com.haidechizi.fastadmin.common.utils.Response;
import com.haidechizi.fastadmin.modules.sys.entity.SysLog;
import com.haidechizi.fastadmin.modules.sys.service.SysLogService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 系统日志
 */
@RestController
@RequestMapping("/sys/log")
public class SysLogController {
    @Autowired
    private SysLogService sysLogService;

    /**
     * 列表
     */
    @RequestMapping("/list")
    @RequiresPermissions("sys:log:list")
    public Response list(PageDto pageDto, SysLog sysLog) {
        PageInfo page = sysLogService.queryPage(pageDto, sysLog);

        return Response.ok().put("page", page);
    }

}
